package top.zywork.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * UserHierarchyDAO数据访问接口<br/>
 *
 * 创建于2020-03-05<br/>
 *
 * @author http://zywork.top 王振宇
 * @version 1.0
 */
@Mapper
public interface UserHierarchyDAO extends BaseDAO {

    @Override
    List<Object> listAllByCondition(@Param("query") Object queryObj);

    @Override
    List<Object> listPageByCondition(@Param("query") Object queryObj);

    @Override
    Long countByCondition(@Param("query") Object queryObj);

    /**
     * 删除用户关系
     * @param ancestorId
     * @param userId
     * @return
     */
    int removeUserHierarchy(@Param("ancestorId") Long ancestorId, @Param("userId") Long userId);
}
